UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RlGUz52NdllCp6DG53JakXb9/MyuhH1dZ7KEfMa2RDo='
WHERE
key_id = '723a54c4688e1610fcf9b6ba3ab775e9fc682fe71cf22980b8fb90aa0b7efcbd'
AND (
token = 'RlGUz52NdllCp6DG53JakXb9/MyuhH1dZ7KEfMa2RDo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)