UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sTIg9J4rVkZEvqJ2ALEpaLfXjFpBKBLpXs19USRelOo='
WHERE
key_id = '2e480d1883d8e7a7a807a196fd26f6f2520e9dafcfeed2e6b7577137b8e53f73'
AND (
token = 'sTIg9J4rVkZEvqJ2ALEpaLfXjFpBKBLpXs19USRelOo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)