UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iNZ4FPS7n8gctWmk/ZHG6juF7Kuy6RXGZVoZbCqMV5Q='
WHERE
key_id = '708f0170033e57289cd617e83717f9219f5c4696590af1b25e1625ff67e18837'
AND (
token = 'iNZ4FPS7n8gctWmk/ZHG6juF7Kuy6RXGZVoZbCqMV5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)