UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JnxFg0jZ+gNmwWT1Mk5lxblM335QGjtTeGC0MYhakwQ='
WHERE
key_id = '6007b45db7eb9aed6843fa883d4868cb11ce096659245b3c633bd195ee1eec68'
AND (
token = 'JnxFg0jZ+gNmwWT1Mk5lxblM335QGjtTeGC0MYhakwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)