UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4UIDv4fJQ45jtrhIEo8pFhljQQjydXMt6fjTBassq3M='
WHERE
key_id = '37d9095f939b744c6b0caf603e2c89be4c4ed847b4e86cafa833cab3c091e97d'
AND (
token = '4UIDv4fJQ45jtrhIEo8pFhljQQjydXMt6fjTBassq3M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)