UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mp1/cQmSSZVgdU4LM26aBPCmiBOmi51xRMgcT/mHUoE='
WHERE
key_id = 'd9b8c5585ab8cfdb9b92f26cd7647ed749ef460f61fab19cb86d7a0c29c8a7f1'
AND (
token = 'Mp1/cQmSSZVgdU4LM26aBPCmiBOmi51xRMgcT/mHUoE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)