UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HOw7GwjnI9fq7zfgZ1wq0w6FKWRXxP2cYUqKfn8RO+o='
WHERE
key_id = '5b4e53f6cc0c148b654b68994bb4d7ab70043d6d50d0c0fc1a0c8c5e6a50011c'
AND (
token = 'HOw7GwjnI9fq7zfgZ1wq0w6FKWRXxP2cYUqKfn8RO+o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)