UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JJvIePEJVf8/g47wPPrjKa5WixVRQLGwaMJ3gDs5Qno=' 
WHERE 
  key_id = '067b9fb637db6071ea93055efc51fbc02bd2d5c0f3e68192cd079236079bd8ad' 
  AND (
    token = 'JJvIePEJVf8/g47wPPrjKa5WixVRQLGwaMJ3gDs5Qno=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039