UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AkB40r5VciPD0APN5fAq99U/5n3XxTeCt+noEyzR35A='
WHERE
key_id = '26857a13eece0f1cad842d6f724005c0db29a7a8c15fb2e329e14b1fa24950c0'
AND (
token = 'AkB40r5VciPD0APN5fAq99U/5n3XxTeCt+noEyzR35A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)