UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GANXYXFyfxhXjdTazMst9Xig84+iJauFchPj/lOXiGw='
WHERE
key_id = '72d536181b906c9540517fd39766ffab712c492cebd2bdf7e1bd10d80deeeae1'
AND (
token = 'GANXYXFyfxhXjdTazMst9Xig84+iJauFchPj/lOXiGw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)