UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'c6BHvxpH8lahj2OqjkXp2GASQkMbp/caF6BMYwbq2Pc=' 
WHERE 
  key_id = 'dee4d35436a0aedf49dda0dec06dc93dd84503bf7af2f6c6af866b1acfcad06b' 
  AND (
    token = 'c6BHvxpH8lahj2OqjkXp2GASQkMbp/caF6BMYwbq2Pc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028