UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Uon7V2t5ImyoVc1xZMXzZUcMtDj0/NuODhFHyE72Pgo='
WHERE
key_id = '60abc6ce23febcc0775d8c6b5c6a651ddbb4ff15455fa5182ee0c02c13978270'
AND (
token = 'Uon7V2t5ImyoVc1xZMXzZUcMtDj0/NuODhFHyE72Pgo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)