UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LMJQ/btzE/p0oD+4OyvNPKm3hoMEetEqKaZwt1DMyQY='
WHERE
key_id = '61172bc02b1c7a49040d96f66e7b7ac9003ba45993a62fda050ca195be4f4354'
AND (
token = 'LMJQ/btzE/p0oD+4OyvNPKm3hoMEetEqKaZwt1DMyQY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)