UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EtTeG8oUpkpUeT9vCUEbn4TsHseL95i1R9udcOgDdsw='
WHERE
key_id = 'f27144292bd94795184482ca300a921e1c24046507e05360418571f2ef382c9d'
AND (
token = 'EtTeG8oUpkpUeT9vCUEbn4TsHseL95i1R9udcOgDdsw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)