UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OnJNwV/UXANP4bJ3XboqRyssftPxbheU4HUgywWfb8Y='
WHERE
key_id = '5369212d2a7a64b3eb8518c1d26c2461a2e14b6dc6842694d9805ef9a6619cf1'
AND (
token = 'OnJNwV/UXANP4bJ3XboqRyssftPxbheU4HUgywWfb8Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)