UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b0CcjVOxYqNrnDbPZG1I8Iiq8itHeqtaIWokiFIheXM='
WHERE
key_id = '9c5f7d10bbd49b6e35791b7f3b7f39740b0ac383265971f14aae28bc946e7ae3'
AND (
token = 'b0CcjVOxYqNrnDbPZG1I8Iiq8itHeqtaIWokiFIheXM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)