UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jqdO/yW7NSNA+EEEKTqTGHAWS2MyLS3soYbcGChM7aQ='
WHERE
key_id = '225f612f9c5a051de6580d15b24519d8251610530f0b8ef4aec061b916e21417'
AND (
token = 'jqdO/yW7NSNA+EEEKTqTGHAWS2MyLS3soYbcGChM7aQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)