UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/enNMDaeZ7aksCCu70JF+0h/lYd4KhHh2Hox+iRURw='
WHERE
key_id = '120561764c819b08057f6d0e84873bfcc5af32162bbb527601c71650c25338ce'
AND (
token = 'e/enNMDaeZ7aksCCu70JF+0h/lYd4KhHh2Hox+iRURw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)