UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OB1DgRfn0hV4NnvTxTvV9LWoMG5cBt/dgJ3msJV0cmY='
WHERE
key_id = '11d03e82a918259d48285b2ce7a2d166f0d95357c74ac787eba193fd6d0b414b'
AND (
token = 'OB1DgRfn0hV4NnvTxTvV9LWoMG5cBt/dgJ3msJV0cmY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)