UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o0kXEozm6tWCS6oePn+/mraHcEbU9k7fbc1Vu3/Sx04='
WHERE
key_id = '9e0c5b822bfd09f5fd619bf3b9091be717903ed89f5aa0051b480a5db5e78262'
AND (
token = 'o0kXEozm6tWCS6oePn+/mraHcEbU9k7fbc1Vu3/Sx04='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)