UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EXP26M1/TAc3U6C5Nf6l1pluKGnE0nhVzi5KczNcO/Q='
WHERE
key_id = 'f9172bddfb367bd19eeb62a9da624e1eecc2b2fd5da229591f2149dda6e0da55'
AND (
token = 'EXP26M1/TAc3U6C5Nf6l1pluKGnE0nhVzi5KczNcO/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)