UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MrzW7JIhde8BB/73D2luRonqI1wtRlPUAyHUBIPIqYM='
WHERE
key_id = '88060d582817dab29c644ebf47bc484eea9997e8708488daf48a3d27a9a36d5b'
AND (
token = 'MrzW7JIhde8BB/73D2luRonqI1wtRlPUAyHUBIPIqYM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)