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