UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7k8C192WuXu6doCPClIikG34Kpn9sKQwp5h2XCJTFic='
WHERE
key_id = '5eb3cf5316ddc3e473d9ca0651da3d041f3f1a53fef5abf70db8cf7ec89c0c5d'
AND (
token = '7k8C192WuXu6doCPClIikG34Kpn9sKQwp5h2XCJTFic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)