UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1FOJOEZ/QLMVbQ2PAOeK99cin1/hwnTy8LygO8KxlkI='
WHERE
key_id = '83ce4aa9c3ce6750e9d8b4d3d96181958ac96132412f9555d04cb8a3e14b143f'
AND (
token = '1FOJOEZ/QLMVbQ2PAOeK99cin1/hwnTy8LygO8KxlkI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)