UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iGI/iRKHI0HVM0TYP/kSmEVf2+rh6IXNlAl13WI3N1M='
WHERE
key_id = '11998c03e04dc9073fc9710f23ef86691f3d5a56ed3cacca3d5c7313e4ec2f42'
AND (
token = 'iGI/iRKHI0HVM0TYP/kSmEVf2+rh6IXNlAl13WI3N1M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)