UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8geEMhQb81xcsmGjHNApR0HQhhhkH79+Lu+ktj5tVTE='
WHERE
key_id = 'fbf8bccd86184318e8636e2ac9a1c703d52a5a15f6f81a5d9e544a002aa55f26'
AND (
token = '8geEMhQb81xcsmGjHNApR0HQhhhkH79+Lu+ktj5tVTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)