UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1+ym5Q0i86ktKkDyxefI3XRjbTObpBq6NSu3fPQeZ6s='
WHERE
key_id = '96b9c0ccb2b369e6a7c579ed68846d4df8b5ca8f5f71d4baaab3d8998aeb1aca'
AND (
token = '1+ym5Q0i86ktKkDyxefI3XRjbTObpBq6NSu3fPQeZ6s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)