UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xl5CkM+L+VfGCUBUrykiBA7VCxtjzwdJ08V0m1iDkd8='
WHERE
key_id = 'ce75c6c7a8dbbdff85401ba21963d748ba3b43b2cffe1c52740b9676dac292e5'
AND (
token = 'Xl5CkM+L+VfGCUBUrykiBA7VCxtjzwdJ08V0m1iDkd8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)