UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1apwxZhOaIh3dcgqQ+7LEEFqV/UJGz3n7PqrGhUW0VE='
WHERE
key_id = '82b557cefa851b944257e052894afabbb108fd7b7d3a309082694450b92ed78e'
AND (
token = '1apwxZhOaIh3dcgqQ+7LEEFqV/UJGz3n7PqrGhUW0VE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)