UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IguDvjEWsrFGti/rpMMu+eoMTKMwkYYOtZiH5nVoPuY=' 
WHERE 
  key_id = '4cda367c4d355f3dd28d3b6991ea101902a56c4c82e6a7968b95c0b86d6e0aa7' 
  AND (
    token = 'IguDvjEWsrFGti/rpMMu+eoMTKMwkYYOtZiH5nVoPuY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058