UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OuOU3JzC8M77SG2/1paQjdNL3B7G6WDDJCIMkJTKgVQ=' 
WHERE 
  key_id = 'e49a2c8fd6bcc0532187cf3fa5721646f95280c65cc6d440508bb9d35ce6028e' 
  AND (
    token = 'OuOU3JzC8M77SG2/1paQjdNL3B7G6WDDJCIMkJTKgVQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039