UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7WXGgSnW2aHy7DiWnsUvdUHZ2N+nL8QEToHQMNJAkWU='
WHERE
key_id = '67454300bdbfd2cd40623adb3a57c76f66a5e43644ea057bda7ad4139b30f71c'
AND (
token = '7WXGgSnW2aHy7DiWnsUvdUHZ2N+nL8QEToHQMNJAkWU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)