UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HvonjX9/TrrH81ra11oLq3wp/SoljdUzvPOXmTQUhLE='
WHERE
key_id = '8b46021404c2eb2699930f60d70423af48e3439929fbe92cbc4d9bd634d4df2a'
AND (
token = 'HvonjX9/TrrH81ra11oLq3wp/SoljdUzvPOXmTQUhLE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)