UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'unrbQ0rcdCO8KMGL37SJ7jvyqqvWXIiNqT1/eTz20qo='
WHERE
key_id = '7aa98ad6b71a6fe860c3175cf423af7e033ff8ffd792891c7874cdaa0b414eff'
AND (
token = 'unrbQ0rcdCO8KMGL37SJ7jvyqqvWXIiNqT1/eTz20qo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)