UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1WBoVO4Dlh+I2pnecsxTLK35w9GKoagcLpbhsFxT3AU='
WHERE
key_id = '3195a5c0d7a2be0329c5b7fc33b3829ae3b9d2cea0faaea9d6d18cbeddc3fe9c'
AND (
token = '1WBoVO4Dlh+I2pnecsxTLK35w9GKoagcLpbhsFxT3AU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)