UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'R7zcUGAo1azohtdq7o4N4P5azUbEFL5W4OFBmBfaf4A='
WHERE
key_id = '754bd966f911806dfc118c9e3262f8ca93d8c80129cc79b8ed0eaf7a3c703625'
AND (
token = 'R7zcUGAo1azohtdq7o4N4P5azUbEFL5W4OFBmBfaf4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)